<jcpsm:pageContainer>
<div class="content">
<div>
<div class="">
<h1 class="title">JCP<span>Schedule List</span></h1>

<table border="1" width="100%" class="gridtable scheduleView roundcornerdiv">
	<tr align="center" class="fillgray heading height35">
		<td>
			Week
		</td>
		<td>
			Saturday
		</td>
		<td>
			Sunday
		</td>
		<td>
			Monday
		</td>
		<td>
			Tuesday
		</td>
		<td>
			Wednesday
		</td>
		<td>
			Thursday
		</td>
		<td>
			Friday
		</td>
	</tr>
	
	<c:if test="${not empty sessionScope.scheduleDTO}">
	
	<c:if test="${not empty sessionScope.scheduleDTO.weeklyScheduleList}">
		<c:forEach var="weeklySchedule" items="${sessionScope.scheduleDTO.weeklyScheduleList}" varStatus="loop">
			<tr class='height35' style='<c:if test="${loop.index%2 == 0}">background-color:#F9FFFF</c:if>'>
				<td width="110px">
					<span style="font-weight: bold">${weeklySchedule.value.weekId}
						<a title="Export" href="${contextRoot}/exportScheduleAsExcel?weekId=${weeklySchedule.value.weekId}" target="_new"><img title="Export Excel" src="${mediaRoot}/msexcel.jpeg" height="20" width="20"/></a>
						<%-- %><a href="${contextRoot}/exportScheduleAsPdf?weekId=${weeklySchedule.value.weekId}" target="_new"><img src="${mediaRoot}/pdf.jpeg" height="20" width="20"/></a>--%>
					</span>
				</td>
				<c:forEach var="dailySchedule" items="${weeklySchedule.value.dailyScheduleList}" varStatus="loop2">	
					<td>
					<c:if test="${not empty dailySchedule.value.userTimelineList}">
						<a href="#" id="link${loop.index}${loop2.index}" onmouseover="showDiv(this);" onmouseout="hideDiv(this);">
					</c:if>
							<c:if test="${empty dailySchedule.value.firstShiftMaster && empty dailySchedule.value.secondShiftMaster}">
							<c:if test="${not empty dailySchedule.value.userTimelineList}">
								No shift master	
							</c:if>
							</c:if>
							<c:if test="${not empty dailySchedule.value.firstShiftMaster}">
								${dailySchedule.value.firstShiftMaster} <br>
							</c:if>
							<c:if test="${not empty dailySchedule.value.secondShiftMaster}">
								${dailySchedule.value.secondShiftMaster} <br>
							</c:if>
						<c:if test="${not empty dailySchedule.value.userTimelineList}">
						 </a>
						</c:if>
						<div id="divlink${loop.index}${loop2.index}" class="schduleViewDiv">
							<c:if test="${not empty dailySchedule.value.userTimelineList}">
							<table class="gridtable roundcornerdiv schedulePreview">
								<tr class="fillgray heading" align="center">
										<td>User</td>
										<td>Track</td>
										<td>Shift</td>
									<tr>
								<c:forEach var="timeline" items="${dailySchedule.value.userTimelineList}" varStatus="loop3">
									<tr>
										<td>${sessionScope.approvedUsers[timeline.user].name}</td>
										<td>${sessionScope.track[timeline.track].name}</td> 
										<td>${sessionScope.shift[timeline.shift].shiftName}</td>
									<tr>
								</c:forEach>
							</table>
							</c:if>
						</div>
					</td>
				</c:forEach>
			</tr>
	</c:forEach>
	</c:if>
	</c:if>
</table>
</div>
</div>
</div>
</jcpsm:pageContainer>